<template>
    <div>
        <nav-bar :name="name">
            <template v-slot:left>
                <p>返回箭头</p>
            </template>
            <template v-slot:center>
                <h3>中间的内容哈哈</h3>
            </template>
            <!-- #是语法糖 -->
            <template #right>
                <h3>右边图标</h3>
            </template>

            <!-- [name]  直接使用下面的name -->
            <template v-slot:[name]> 
                <h3>动态插槽名</h3>
            </template>
        </nav-bar>
    </div>
</template>
<script>
import NavBar from './NavBar.vue'
export default {
    components: {
        NavBar
    },
    name: '',
    data() {
       return {
           name: "yzh"
       }
    },
    created() {},
    methods: {},
}
</script>
<style>
</style>
